﻿@using ContestMeter.Web.Site.Database.Entities
@using ContestMeter.Web.Site.Models
@model TeamsParticipantsListViewModel

<h2 class="alert alert-info">Участники</h2>

<table class="table">
    <tr>
        <th>Логин</th>
        <th>Email</th>
        <th>Ip</th>
        <th>Фамилия</th>
        <th>Имя</th>
        <th>Отчество</th>
        <th></th>
    </tr>

    @foreach (var item in Model.TeamParticipants)
    {
        <tr class="alert alert-success">
            <td>
                @Html.DisplayFor(modelItem => item.UserName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Email)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Ip)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FirstName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MiddleName)
            </td>
            <td>
                @Html.ActionLink("Удалить", "DeleteParticipants", "Team", new { teamId = Model.TeamId, id = item.Id }, null)
            </td>
        </tr>
    }

    @foreach (var item in Model.Participants)
    {
        <tr class="alert alert-warning">
            <td>
                @Html.DisplayFor(modelItem => item.UserName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Email)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Ip)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FirstName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MiddleName)
            </td>
            <td>
                @Html.ActionLink("Добавить", "AddParticipants", "Team", new { teamId = Model.TeamId, id = item.Id }, null)
            </td>
        </tr>
    }
</table>






